<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>DOM事件</title>
</head>
<body>
<div onmousedown="mDown(this)"
    onmouseup="mUp(this)"
     style="background-color: #D94A38;
width: 90px;height: 20px;padding: 40px;"
>
    点击鼠标
</div>

<script>
    function mDown(obj){
        obj.style.backgroundColor = "#1ec5e5";
        obj.innerHTML = "松开鼠标"
    }

    function mUp(obj){
        obj.style.backgroundColor = "#D94A38";
        obj.innerHTML = "谢谢您";
    }
</script>
</body>
</html>